home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
WINDOWS
/
PROFFT.ARJ
/
MAGNIFY.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-20
|
2KB
|
67 lines
#include <owl.h>
#define min(a,b) ((a<b)?a:b)
#define max(a,b) ((a<b)?b:a)
const int LINESIZE = 1;
const int PAGESIZE = 10;
const int SCROLLMIN = 10;
const int SCROLLMAX = 200;
class TMagnifyApplication : public TApplication
{
public:
TMagnifyApplication (LPSTR lpszName, HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
virtual void InitMainWindow();
};
class TNotRect
{
public:
TNotRect(int X1, int Y1, int X2, int Y2);
void Hide (HDC hdc);
void Show (HDC hdc);
void Move (HDC hdc, int X1, int Y1, int X2, int Y2);
private:
BOOL bVisible;
RECT rCurrent;
void Invert(HDC hdc);
};
class TMagnifyWindow : public TWindow
{
public:
TMagnifyWindow(PTWindowObject pwParent, LPSTR lpszTitle, PTModule pmModule);
~TMagnifyWindow();
virtual LPSTR GetClassName();
virtual void GetWindowClass(WNDCLASS&);
virtual void WMCreate(TMessage& Msg) = [WM_CREATE];
virtual void WMLButtonDown(TMessage& Msg) = [WM_LBUTTONDOWN];
virtual void WMMouseMove(TMessage& Msg) = [WM_MOUSEMOVE];
virtual void WMLButtonUp(TMessage& Msg) = [WM_LBUTTONUP];
virtual void WMVScroll(TMessage& Msg) = [WM_VSCROLL];
virtual void WMPaint(TMessage& Msg) = [WM_PAINT];
virtual void WMSize(TMessage& Msg) = [WM_SIZE];
protected:
BOOL bCapture;
HDC hdcScreen;
HDC hdcWindow;
int nStretch;
POINT ptAnchor;
POINT ptLast;
RECT rClient;
RECT rSource;
tNotRect * pnrTrack;
void ClientToSource(LPRECT lpIn, LPRECT lpOut);
};
int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
TMagnifyApplication Magnify("Magnify", hInstance, hPrevInstance, lpszCmdLine, nCmdShow);
Magnify.Run();
return Magnify.Status;
}
TMagni